package com.wwg.threads.binghe.concurrent.executor;

import java.util.concurrent.*;

public class FutureTest {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        ExecutorService executorService = Executors.newSingleThreadExecutor();
        Future<String> future = executorService.submit(() -> "future 测试结果");

        String s = future.get();
        System.out.println(s);
        executorService.shutdown();


    }

}
